<div class="container usermanage-container">
	{{!-- <h2 class="panel-title">全局账号列表</h2> --}}
	<div class="usermanage-div-btn">
		<button class="u-btn-blue" {{action "openDialog"}}>添加用户</button>
	</div>
	<div class="control-group usermanage-info">
		{{view view.Grid
			columns=columns
			content=users
			allowPaging=true
			pageIndex=pageIndex
			pageSize=pageSize
			totalRows=totalRows
			pageIndexChanged="pageIndexChanged"
			class="conf-usermangge-grid"}}
	</div>
</div>

{{#view view.Dialog
	id="usermanage_add"
	title="添加用户" 
	autoOpen=false
	modal=true
	width=400
	height=400
	resizable=false
	class="common-popUp usermanage-add"
	buttons=dialogButtons}}
	<div id="dialog">
		<div {{bind-attr class=":alert alertType formTip::hide"}}><strong>{{formTip}}</strong></div>
		<div class="control-group">
			<label class="group-title">账号</label>
			<div class="group-content">
				{{input class="input u-input-blue" value=form.account}}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">用户名</label>
			<div class="group-content">
				{{input class="input u-input-blue" value=form.name}}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">密码</label>
			<div class="group-content">
				{{input type="password" class="input u-input-blue" value=form.password}}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">确认密码</label>
			<div class="group-content">
				{{input type="password" class="input u-input-blue" value=form.repassword}}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">角色</label>
			<div class="group-content">
				{{!-- {{view "select"
					class="u-input-blue"
					content=roles							
					optionLabelPath="content.name"
					optionValuePath="content.code"
					value=form.role}} --}}
				{{view view.parentView.select 
					class="form-top-select form-top-select-app"
					content=roles
					selectValue=form.role
					optionLabelPath="name"
					optionValuePath="code"
				}} 
			</div>
		</div>
		<div class="control-group">
			<div class="group-options">
				<button type="submit" {{action "addUser"}} class="u-btn-blue">确定</button>
				<button type="button" {{action "closeDialog" "1"}} class="u-btn-blue">取消</button>
			</div>
		</div>
	</div>	
{{/view}}

{{#view view.Dialog
	id="usermanage_upd"
	title="修改用户" 
	autoOpen=false
	modal=true
	resizable=false
	width=400
	height=300
	class="usermanage-upd common-popUp"
	buttons=dialogButtons}}
	<div id="dialog">
		<div {{bind-attr class=":alert updUserTip::hide"}}><strong>{{updUserTip}}</strong></div>
		<div class="control-group">
			<label class="group-title">账号</label>
			<div class="group-content">
				{{input class="input u-input-blue" disabled="true" value=form.account tooltip="请填写账号" }}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">用户名</label>
			<div class="group-content">
				{{input class="input u-input-blue" value=form.name}}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">角色</label>
			<div class="group-content">
				{{!-- {{view "select"
					class="u-input-blue"
					content=roles
					optionLabelPath="content.name"
					optionValuePath="content.code"
					value=form.role}} --}}

				{{view view.parentView.select 
					class="form-top-select form-top-select-app"
					content=roles
					selectValue=form.role
					optionLabelPath="name"
					optionValuePath="code"
				}} 
			</div>
		</div>
		<div class="control-group">
			<div class="group-options">
				<button type="submit" {{action "updUser"}} class="u-btn-blue">确定</button>
				<button type="button" {{action "closeDialog" "2"}} class="u-btn-blue">取消</button>
			</div>
		</div>
	</div>	
{{/view}}

{{#view view.Dialog
	id="usermanage_updpwd"
	title="修改用户密码" 
	autoOpen=false
	modal=true
	width=400
	height=320
	resizable=false
	class="common-popUp usermanage-updpwd"
	buttons=dialogButtons}}
	<div id="dialog">
	<div {{bind-attr class=":alert alertType updPWD::hide"}}><strong>{{updPWD}}</strong></div>
		<div class="control-group">
			<label class="group-title">账号</label>
			<div class="group-content">
				{{input class="input u-input-blue" value=form.account disabled="disabled"}}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">新密码</label>
			<div class="group-content">
				{{input type="password" class="input u-input-blue" value=form.password}}
			</div>
		</div>
		<div class="control-group">
			<label class="group-title">确认新密码</label>
			<div class="group-content">
				{{input type="password" class="input u-input-blue" value=form.repassword}}
			</div>
		</div>
		<div class="control-group">
			<div class="group-options">
				<button type="submit" {{action "updatepwd"}} class="u-btn-blue">确定</button>
				<button type="button" {{action "closeDialog" "3"}} class="u-btn-blue">取消</button>
			</div>
		</div>
	</div>	
{{/view}}
